package com.tpyule.tpclass.dao;

import com.tpyule.tpclass.entity.bo.CourseEvaluationRateBo;
import com.tpyule.tpclass.entity.bo.EvaluationDetailBo;
import com.tpyule.tpclass.entity.dto.EvaluationQueryDto;
import com.tpyule.tpclass.entity.pojo.Evaluation;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zzz
 * @version 1.0
 * @date 2020/4/18 15:55
 */
@Mapper
public interface EvaluationDao {
    /**
     * 添加评价
     * @param evaluation
     * @return
     */
    public int addEvaluation(Evaluation evaluation);

    /**
     *获取评价
     * @param evaluationQueryDto
     * @return
     */
    public List<EvaluationDetailBo> getEvaluations(EvaluationQueryDto evaluationQueryDto);

    /**
     * 根据课程ID获取课程评分
     * @param courseId
     * @return
     */
    public CourseEvaluationRateBo getRateByCourseId(String courseId);
}
